xend, passthrough: Small fix to find_all_the_multi_functions()
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Oct 2009 12:20:07 +0000 (12:20 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Oct 2009 12:20:07 +0000 (12:20 +0000)
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/util/pci.py

index 8334e3d437b7ef0872912cda3ad97bacdee6bca0..e89bf3446fd5ccbd2d43e74f2c1c3074fec3a701 100644 (file)
@@ -830,7 +830,10 @@ class PciDevice:
 
     def find_all_the_multi_functions(self):
         sysfs_mnt = find_sysfs_mnt()
-        parent = pci_dict_to_bdf_str(self.find_parent())
+        parentdict = self.find_parent()
+        if parentdict is None :
+            return [ self.name ]
+        parent = pci_dict_to_bdf_str(parentdict)
         pci_names = os.popen('ls ' + sysfs_mnt + SYSFS_PCI_DEVS_PATH + '/' + \
             parent + '/').read()
         funcs = extract_the_exact_pci_names(pci_names)